package com.fbd.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fbd.internalcommon.dto.DicDistrict;
import com.fbd.internalcommon.dto.ResponseResult;
import com.fbd.mapper.DicDistrictMapper;
import com.fbd.service.DicDistrictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
    @Autowired
    private DicDistrictMapper dicDistrictMapper;

    @Autowired
    private DicDistrictService dicDistrictService;
    @GetMapping("/test")
    public String test(){
        LambdaQueryWrapper<DicDistrict> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(DicDistrict::getAddressCode , "111000");
        DicDistrict dicDistrict = dicDistrictMapper.selectOne(wrapper);
        System.out.println(dicDistrict.getAddressCode());
        System.out.println(dicDistrict.getAddressName());
        dicDistrictService.initDicDistrict();
        return "service-map";
    }

}
